package com.jingxing.provider;

/**
 * @author han
 * @title: UserInfoMapperProvider
 * @date 2021/9/15 11:36
 */
public class UserInfoMapperProvider {

    public String getMinUserId() {
        StringBuilder sql = new StringBuilder();
        sql.append("SELECT\n" +
                "\ta.id,\n" +
                "\tCOUNT( b.id ) remark ");
        sql.append("FROM\n" +
                "\tuser_info a\n" +
                "\tLEFT JOIN player_user_info b ON a.id = b.sys_user_id ");
        sql.append("WHERE\n" +
                "\ta.role = 1 \n" +
                "GROUP BY\n" +
                "\ta.id \n" +
                "ORDER BY\n" +
                "\tremark\n" +
                "LIMIT 1 ");
        return sql.toString();
    }


}
